package com.TeacherInfoServer.pojo.excelImport;

import com.alibaba.excel.annotation.ExcelProperty;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class PostDoctoralExcel {
    @NotNull(message = "工号不能为null")
    @NotEmpty(message = "工号不能为空")
    @Size(min = 10, max = 10, message = "不是有效工号")
    @ExcelProperty(value = "教师工号",index = 0)
    private String teacherId;
    @ExcelProperty(value = "姓名",index = 1)
    private String teacherName;
    @NotNull(message = "研究单位不能为null")
    @NotEmpty(message = "研究单位不能为空")
    @ExcelProperty(value = "博士后研究单位",index = 2)
    private String researchUnit;
    @NotNull(message = "进站时间不能为null")
    @NotEmpty(message = "进站时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    @ExcelProperty(value = "进站时间",index = 3)
    private String entryDate;
    @NotNull(message = "出站时间不能为null")
    @NotEmpty(message = "出站时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    @ExcelProperty(value = "出站时间",index = 4)
    private String exitDate;
}
